package com.jxs.android.weiget;

import com.jxs.android.ges.R;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

public class BMonthView extends LinearLayout {

	public BMonthView(Context context) {
		this(context, null);
	}

	public BMonthView(Context context, AttributeSet attrs) {
		super(context, attrs);
		setupView(context);
	}

	private Button btnDate;
	private TableFormView tableView;

	void setupView(Context context) {
		LayoutInflater flater = LayoutInflater.from(context);
		flater.inflate(R.layout.layout_month, this);

		btnDate = (Button) findViewById(R.id.date_picker);
		tableView = (TableFormView) findViewById(R.id.table_month);
	}

	public void setBtnDateListener(View.OnClickListener l) {
		btnDate.setOnClickListener(l);
	}

	private String dateYM;

	public void setDatePromp(String date) {
		dateYM = date;
		btnDate.setText(date);
	}

	public String getDateYM() {
		return dateYM;
	}

	public TableFormView getMonthTable() {
		return tableView;
	}

	public Button getBtnDate() {
		return btnDate;
	}

}